import { createApp } from 'vue'

import App from './App.vue'
// 版本号
import config from '../package.json'
// SVG环境
import 'virtual:svg-icons-register'
import svgIcon from '@/components/SvgIcon/index.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as echarts from 'echarts'
import router from './router/index.js'
import zhCn from 'element-plus/dist/locale/zh-cn.mjs'
// 动态图标
import * as ElementPLusIconsVue from '@element-plus/icons-vue'
const app = createApp(App);
app.config.globalProperties.$version = config.nversion;
console.log('当前版本：', config.nversion)
app.use(ElementPlus, {
    locale: zhCn,
})
app.config.globalProperties.$echarts = echarts

app.use(router)
for (const [key, component] of Object.entries(ElementPLusIconsVue))
{
    app.component(key, component)
}
app.component('svg-icon', svgIcon);
app.mount('#app')
